<template lang="pug">
    .list
        Summarize
        detail
</template>

<script>
import Summarize from "./Summarize";
import Detail from "./Detail";

export default {
  name: "List",
  components: { Detail, Summarize },
  data() {
    return {
      list: {}
    };
  },
  mounted() {
    this.getData();
  },
  methods: {
    // 获取数据
    getData() {
      this.$axios
        .get(
          "https://www.easy-mock.com/mock/5b45a98b006d5369319dcba0/getList/list"
        )
        .then(response => {
          this.list = response.data.data.list;
          this.$store.commit("saveList", this.list);
        });
    }
  }
};
</script>

<style scoped lang="stylus">
    .list
        background-color white
        box-shadow 1px 1px 5px gray
</style>
